package core.effects;

import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.Point;

/**
 * Represents a particle effect. This is used by a Particle Engine.
 * 
 * @author Jason
 * 
 */
public interface Effect {

	/**
	 * Initializes this effect with the given parameters.
	 */
	public void construct(Object[] parameters);

	/**
	 * Ticks this effect forward.
	 * 
	 * @return True if this effect is still active, False if it is finished.
	 */
	public boolean tick(double seconds);

	/**
	 * Draws all the particles of this effect onto the screen.
	 * 
	 * @param g
	 */
	public void render(Graphics2D g);

	/**
	 * Gets the approximate center location of this effect.
	 */
	public Point getCenter();

	/**
	 * Gets the approximate dimension of this effect.
	 */
	public Dimension getSize();

	/**
	 * Resets this effect to it's initial state.
	 */
	public void reset();

	/**
	 * Gets the maximum number of particles that this effect will have in use.
	 */
	public int getNumParticles();
}
